
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Version;

@Entity
public class Student implements Serializable {

    @Id
    private int matrikel;
    
    private String name;
    
    @Version
    private int version;
    
    public Student() {
    }
    
    public Student(int matrikel, String name) {
        this.matrikel = matrikel;
        this.name = name;
    }

    /**
     * @return the matrikel
     */
    public int getMatrikel() {
        return matrikel;
    }

    /**
     * @param matrikel the matrikel to set
     */
    public void setMatrikel(int matrikel) {
        this.matrikel = matrikel;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the version
     */
    public int getVersion() {
        return version;
    }

    /**
     * @param version the version to set
     */
    public void setVersion(int version) {
        this.version = version;
    }
    
    
}
